//
//  MIDIMyfoucusCell.m
//  迷笛
//
//  Created by . on 2018/9/13.
//  Copyright © 2018年 🍃🌺🌺🍃. All rights reserved.
//

#import "MIDIMyfoucusCell.h"

@implementation MIDIMyfoucusCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self addSubview:self.heardimgea];
        [self.heardimgea mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(40));
            make.width.mas_offset(WidthScale(50));
            make.height.mas_offset(kDevice_Is_iPhoneX?HeighX(50):HeightScale(50));
        }];
        [self addSubview:self.name];
        [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.heardimgea);
            make.left.equalTo(self.heardimgea.mas_right).offset(WidthScale(20));
            [self.name setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.foucus];
        [self.foucus mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.heardimgea);
            make.right.mas_equalTo(WidthScale(-20));
            make.width.mas_offset(WidthScale(50));
            make.height.mas_offset(kDevice_Is_iPhoneX?HeighX(25):HeightScale(25));
        }];
        
        
    }
    return self;
}
-(UIImageView *)heardimgea
{
    if (!_heardimgea)
    {
        _heardimgea =[[UIImageView alloc]init];
        _heardimgea.layer.masksToBounds = YES;
        
        [_heardimgea.layer setCornerRadius:WidthScale(25)]; //设置矩圆角半径

    }
    return _heardimgea;
}
-(UILabel *)name
{
    if (!_name)
    {
        _name =[[UILabel alloc]init];
        _name.textColor=[UIColor colorWithHexString:@"#FFFEFE"];
        _name.font =[UIFont systemFontOfSize:WidthScale(15)];
    }
    return _name;
}
-(UIButton *)foucus
{
    if (!_foucus)
    {
        _foucus = [[UIButton alloc]init];
        _foucus.titleLabel.font =[UIFont systemFontOfSize:WidthScale(12)];
        _foucus.layer.masksToBounds = YES;
        [_foucus.layer setCornerRadius:WidthScale(5)]; //设置矩圆角半径

    }
    return _foucus;
}

@end
